/**
 * Created by gongxun on 16/11/20.
 */

var HallRePlayResponse = function(){
    var that = new GameResponseBase();

    that.handle = function (binary, msgid) {
        that.loadMessage(binary, msgid);

        var code = that.msg.code;
        if (code == 0){
            mo.recordDetailedHelper.insertRecordDetailed(that.msg.ReplayId, that.msg);

            mo.eventHelper.dispatch_1("RePlayResponse", that.msg);
        }else{
            if (code == 1){
                mo.showRoomMsgShow("未找到该录像，请检查录像id", false);
            }else if (code == 2){
                mo.showRoomMsgShow("获取录像失败，道具不足", false);
            }else if (code == 3){
                mo.showRoomMsgShow("获取录像失败，该录像已过保存期或不存在", false);
            }
        }
    };

    return that;
};